home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr11
/
wpjv1n5.zip
/
WINSTUB.ZIP
/
WINSTUB.CPP
next >
Wrap
C/C++ Source or Header
|
1993-04-30
|
655b
|
29 lines
// Enhanced WINSTUB.EXE for Windows applications
#include <process.h>
#include <stddef.h>
#include <iostream.h>
char answer;
int returncode;
int main(void)
{
cerr << "\nThis program requires Microsoft Windows to run.";
cerr << "\nWould you like me to start Microsoft Windows for you? ";
cin >> answer;
if (answer == 'y' || answer == 'Y')
{
returncode = spawnlp(P_WAIT,"win.com","","address",NULL);
if (returncode<0)
{
cerr << "\n\nError, could not start Microsoft Windows.";
cerr << "\nExiting back to DOS...";
}
}
else
cerr << "\n\nExiting back to DOS...";
return returncode;
}